home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / ntwrkprt / maestro.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-15  |  6.3 KB  |  192 lines

  1. /*
  2.  * Copyright (c) 1990, 1991, 1992 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software and 
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that (i) the above copyright notices and this permission notice appear in
  7.  * all copies of the software and related documentation, and (ii) the name
  8.  * Stanford may not be used in any advertising or publicity relating to
  9.  * the software without the specific, prior written permission of
  10.  * Stanford.
  11.  * 
  12.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  13.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  14.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  15.  *
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  17.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
  18.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
  19.  * ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  */
  23.  
  24. /* $Header: /Source/Media/drapeau/NetworkProtocol/RCS/MAEstro.h,v 1.17 92/05/29 12:39:40 drapeau Exp $ */
  25. /* $Log:    MAEstro.h,v $
  26.  * Revision 1.17  92/05/29  12:39:40  drapeau
  27.  * Changed the name of the "Selection" structure to "MAESelection",
  28.  * to avoid name conflicts with other software packages and toolkits
  29.  * that might also define a "Selection" structure.
  30.  * 
  31.  * Revision 1.16  91/11/25  13:00:57  drapeau
  32.  * Added a new function, DestroyPort().  De-allocates space taken by a
  33.  * Port*.
  34.  * 
  35.  * Revision 1.15  91/09/18  12:38:59  drapeau
  36.  * - Modified the definitions of the messaging functions so that they conform to ANSI-C specs.
  37.  * - Added a definition of the new function DestroyPortArray().
  38.  * - Changed definition of getportfromname_1() function to reflect the new return value (the message
  39.  *   now returns an array of matching Ports rather than just a single Port).
  40.  * - Other minor cosmetic changes to clean up the code.
  41.  * 
  42.  * Revision 1.14  91/09/03  16:54:33  drapeau
  43.  * Modified definition of the "GetPortFromName" message so that it returns
  44.  * a Port* instead of a void*.
  45.  * 
  46.  * Revision 1.13  91/06/19  13:56:45  drapeau
  47.  * Added support for five new messages:
  48.  *  - PauseSelection
  49.  *  - ResumeSelection
  50.  *  - HideApplication
  51.  *  - ShowApplication
  52.  *  - GetAppIcon
  53.  * Also, replaced the "PerformPartialSelection" message with
  54.  * "HaltSelection" message.
  55.  * Added two new fields to the Selection structure:
  56.  *  - offset: number of milliseconds from the start of the selection, used for
  57.  *    telling applications to perform partial selections (the selection is set
  58.  *    with the appropriate offset).
  59.  *  - label:  brief, descriptive text for the current selection, if available.
  60.  * 
  61.  * Added a new data structure, IconData, for the new GetAppIcon message.
  62.  * 
  63.  * Revision 1.12  91/06/17  18:17:11  drapeau
  64.  * Added copyright notice.
  65.  * 
  66.  * Revision 1.11  91/02/28  07:13:12  drapeau
  67.  * No code changes; this version uses a new version numbering scheme and new
  68.  * version of RCS.
  69.  * 
  70.  * Revision 1.1  90/10/24  18:19:04  drapeau
  71.  * Initial revision
  72.  *  */
  73.  
  74. #ifndef _MAEstroHeader_
  75. #define _MAEstroHeader_
  76.  
  77. static char maestroRcsid[] = "$Header: /Source/Media/drapeau/NetworkProtocol/RCS/MAEstro.h,v 1.17 92/05/29 12:39:40 drapeau Exp $";
  78.  
  79. #include <rpc/rpc.h>
  80. #include <rpc/pmap_clnt.h>
  81.  
  82. #define LabelLength 256
  83.  
  84. struct Port
  85. {
  86.   char*    hostName;
  87.   char*    appName;
  88.   int    portNumber;
  89. };
  90. typedef struct Port Port;
  91.  
  92.  
  93. struct PortArray
  94. {
  95.   Port*    portArray;
  96.   int     numberOfPorts;
  97. };
  98. typedef struct PortArray PortArray;
  99.  
  100.  
  101. struct MAESelection
  102. {
  103.   int     start;
  104.   int     end;
  105.   int    duration;
  106.   int     offset;
  107.   char     label[LabelLength];
  108. };
  109. typedef struct MAESelection MAESelection;
  110.  
  111.  
  112. struct IconData
  113. {
  114.   char*    iconData;
  115.   int    dataLength;
  116. };
  117. typedef struct IconData IconData;
  118.  
  119.  
  120. typedef struct _DispatchTable
  121. {
  122. void        (*openDocumentPtr)(char**);
  123. char**        (*getCurrentDocNamePtr)(void*);
  124. MAESelection*    (*getSelectionPtr)(void*);
  125. void        (*setSelectionPtr)(MAESelection*);
  126. void        (*performSelectionPtr)(void*);
  127. void        (*connectWithPortMgrPtr)(Port*);
  128. PortArray*    (*getOpenAppsPtr)(void*);
  129. PortArray*    (*getPortFromNamePtr)(Port*);
  130. void        (*dispatchMessagePtr)(struct svc_req*, SVCXPRT*);
  131. void        (*disconnectFromPortMgrPtr)(Port*);
  132. void        (*pingPtr)(void*);
  133. void        (*haltSelectionPtr)(void*);
  134. void        (*pauseSelectionPtr)(void*);
  135. void        (*resumeSelectionPtr)(void*);
  136. void        (*hideApplicationPtr)(void*);
  137. void        (*showApplicationPtr)(void*);
  138. IconData*    (*getAppIconPtr)(void*);
  139. } DispatchTable;
  140.  
  141.  
  142. #define MAEstro ((u_long)99)
  143. #define FirstTestVersion ((u_long)1)
  144. #define OpenDocumentProc ((u_long)1)
  145. #define GetCurrentDocNameProc ((u_long)2)
  146. #define GetSelectionProc ((u_long)3)
  147. #define SetSelectionProc ((u_long)4)
  148. #define PerformSelectionProc ((u_long)5)
  149. #define ConnectWithPortMgrProc ((u_long)6)
  150. #define GetOpenAppsProc ((u_long)7)
  151. #define GetPortFromNameProc ((u_long)8)
  152. #define DisconnectFromPortMgrProc ((u_long)9)
  153. #define PingProc ((u_long)10)
  154. #define HaltSelectionProc ((u_long)11)
  155. #define PauseSelectionProc ((u_long)12)
  156. #define ResumeSelectionProc ((u_long)13)
  157. #define HideApplicationProc ((u_long)14)
  158. #define ShowApplicationProc ((u_long)15)
  159. #define GetAppIconProc ((u_long)16)
  160.  
  161.  
  162. #define    PortMgrPortNumber 6600
  163. #define AnyPort 0
  164.  
  165. bool_t    xdr_Port();
  166. bool_t    xdr_PortArray();
  167. bool_t    xdr_MAESelection();
  168. bool_t    xdr_IconData();
  169. void    DestroyPortArray(PortArray* thePortArray);
  170. void    DestroyPort(Port* thePort);
  171.  
  172.  
  173. extern void        bzero(void*, int);
  174. extern void*        opendocument_1(char** argp, CLIENT* clnt);
  175. extern char**        getcurrentdocname_1(void* argp, CLIENT* clnt);
  176. extern MAESelection*    getselection_1(void* argp, CLIENT* clnt);
  177. extern void*        setselection_1(MAESelection* argp, CLIENT* clnt);
  178. extern void*        performselection_1(void* argp, CLIENT* clnt);
  179. extern void*        connectwithportmgr_1(Port* argp, CLIENT* clnt);
  180. extern PortArray*    getopenapps_1(void* argp, CLIENT* clnt);
  181. extern PortArray*    getportfromname_1(Port* argp, CLIENT* clnt);
  182. extern void*        disconnectfromportmgr_1(Port* argp, CLIENT* clnt);
  183. extern void*        ping_1(void* argp, CLIENT* clnt);
  184. extern void*        haltselection_1(void* argp, CLIENT* clnt);
  185. extern void*        pauseselection_1(void* argp, CLIENT* clnt);
  186. extern void*        resumeselection_1(void* argp, CLIENT* clnt);
  187. extern void*        hideapplication_1(void* argp, CLIENT* clnt);
  188. extern void*        showapplication_1(void* argp, CLIENT* clnt);
  189. extern IconData*    getappicon_1(void* argp, CLIENT* clnt);
  190.  
  191. #endif
  192.